import request from "@/utils/request";

//获取map
export function getMap(){
    return request({
        url:`/api/v1/warehouse/supplier/FindSuppkierMap`,
        method:'GET',
    })
}
//增加供应商
export function addSupplier(params){
    return request({
        url:`/api/v1/warehouse/supplier/SupplierAdd`,
        method:'POST',
        data:params
    })
}
//编辑供应商
export function addEidSupperlier(params){
    return request({
        url:`/api/v1/warehouse/supplier/EidSupperlier`,
        method:'POST',
        data:params
    })
}
//供应商管理LIST
export function supplierList(params){
    return request({
        url:`/api/v1/warehouse/supplier/FindSupplierList`,
        method:'POST',
        data:params
    })
}
//禁用或者启用供应商
export function closeOrOpen(params){
    return request({
        url:`/api/v1/warehouse/supplier/UpdateSupperlierStete`,
        method:'POST',
        data:params
    })
}
//删除供应商
export function deleteSupplier(id){
    return request({
        url:`/api/v1/warehouse/supplier/DeleteSupplier/${id}`,
        method:'GET',
    })
}

export function getSupplier(id){
    return request({
        url:"/api/v1/warehouse/supplier/FindSupplierOne/"+id,
        method:"GET"
    })
}